SharePoint Framework Web Part Development Basics by Nick Day
Author:Nick Day
Language: eng
Format: epub
Publisher: Bookboon.com Ltd.
Published: 2022-05-26T00:00:00+00:00
4.6 Add custom properties to the property pane and define how the web part appears in the toolbox
The property pane is where we can configure the controls that will allow us to set the properties for our web part. We will keep the input control for the description and add a dropdown control to choose between the MS Graph or SharePoint Online API when retrieving the images.
In our project, the property pane code is in the ImageGalleryWepart.ts file. The imageGallery folder is where all our web part code resides. When we scaffolded the project, we chose the No JavaScript framework to make this easier to follow; however, if you had chosen React, the folder structure would have been slightly different.
To avoid having to save our changes every time, let us set Visual Studio Code to auto save. Click on File in the top navigation and then select Auto Save.
In this step, we are going to modify the title of the web part as well as the location of the web part in the web part Toolbox. To achieve this, we need to browse and open the following file ImageGalleryWebpart.manifest.json. The Toolbox groups are defined by GUIDs, and we are going to make our web part available in Text, media, and content group in the web part Toolbox. We will use the following GUID: cf066440-0614-43d6-98ae-0b31cf14c7c3. We also need to change our web part title to Custom Image Gallery because there is an out of the box image gallery web part. This will help the users differentiate between both web parts. The updated file should look like the following:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Computer & Technology Industry | Management Information Systems |
Microsoft Project | Search Engine Optimization |
SharePoint | Social Media for Business |
Software | Web Marketing |
Windows Server |
Exploring Deepfakes by Bryan Lyon and Matt Tora(7083)
Robo-Advisor with Python by Aki Ranin(6974)
Offensive Shellcode from Scratch by Rishalin Pillay(5766)
Ego Is the Enemy by Ryan Holiday(4818)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4396)
Microsoft 365 and SharePoint Online Cookbook by Gaurav Mahajan Sudeep Ghatak Nate Chamberlain Scott Brewster(4349)
Python for ArcGIS Pro by Silas Toms Bill Parker(3852)
Elevating React Web Development with Gatsby by Samuel Larsen-Disney(3543)
Machine Learning at Scale with H2O by Gregory Keys | David Whiting(3249)
Learning C# by Developing Games with Unity 2021 by Harrison Ferrone(3231)
Speed Up Your Python with Rust by Maxwell Flitton(3192)
Liar's Poker by Michael Lewis(3175)
OPNsense Beginner to Professional by Julio Cesar Bueno de Camargo(3164)
Extreme DAX by Michiel Rozema & Henk Vlootman(3140)
Agile Security Operations by Hinne Hettema(3096)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic and Jasmin Redzepagic(3085)
Essential Cryptography for JavaScript Developers by Alessandro Segala(3054)
Cryptography Algorithms by Massimo Bertaccini(2968)
AI-Powered Commerce by Andy Pandharikar & Frederik Bussler(2951)
